package com.hsnn.medstgmini.trading.pur.model;

public enum OrderPackStatus {

	submit(1, "已提交"), pass(11, "已发送"), notPass(12, "审核未通过"), confirmed(2,
			"已确认"), someDispatched(3, "部分配送"), finashDispatched(4, "配送完成"), finishOrder(
			5, "订单完成"),shortDrug(13,"缺货");

	private int key;
	private String value;

	private OrderPackStatus(int key, String value) {
		this.key = key;
		this.value = value;
	}

	public static String getName(int key) {
		for (OrderPackStatus ot : OrderPackStatus.values()) {
			if (ot.key == key) {
				return ot.value;
			}
		}
		return "";
	}

	public static OrderPackStatus getOrderType(int key) {
		for (OrderPackStatus ot : OrderPackStatus.values()) {
			if (ot.key == key) {
				return ot;
			}
		}
		return null;
	}

	public int getKey() {
		return key;
	}

	public void setKey(int key) {
		this.key = key;
	}

	public String getValue() {
		return value;
	}

	public void setValue(String value) {
		this.value = value;
	}

}
